/**
 * @description 生成组件列表
 */
const Mock = require("mockjs");
const Random = Mock.Random;

function getComponentList() {
  return [
    //info
    {
      fe_id: "c1",
      type: "questionInfo", //组件类型
      title: "问卷信息",
      isHidden: false,
      isLocked: false,
      props: { title: "薪资调查", desc: "前端工程师" },
    },
    {
      fe_id: "c2",
      type: "questionTitle", //组件类型
      title: "问卷标题",
      isHidden: false,
      isLocked: false,
      props: { text: "薪资调查", level: 3, isCenter: false },
    },
    //Input
    {
      fe_id: "c3",
      type: "questionInput",
      title: "输入框",
      isHidden: false,
      isLocked: false,
      props: { title: "你的姓名", placeholder: "请输入姓名..." },
    },
    {
      fe_id: "c4",
      type: "questionInput",
      title: "输入框",
      isHidden: false,
      isLocked: false,
      props: { title: "你的城市", placeholder: "请输入地址..." },
    },
    {
      fe_id: "c5",
      type: "questionRadio",
      title: "单选",
      isHidden: false,
      isLocked: false,
      props: {
        title: "工作时间",
        isVertical: false,
        options: [
          { value: "item1", text: "应届生" },
          { value: "item2", text: "1年~3年" },
          { value: "item3", text: "3年~5年" },
          { value: "item4", text: "5年以上" },
        ],
        value: "item1",
      },
    },
    {
      fe_id: "c6",
      type: "questionRadio",
      title: "单选",
      isHidden: false,
      isLocked: false,
      props: {
        title: "薪资",
        isVertical: false,
        options: [
          { value: "item1", text: "5k" },
          { value: "item2", text: "8k" },
          { value: "item3", text: "10k" },
          { value: "item4", text: "15k" },
          { value: "item5", text: "20k" },
        ],
        value: "item2",
      },
    },
    {
      fe_id: "c7",
      type: "questionCheckbox",
      title: "多选",
      isHidden: false,
      isLocked: false,
      props: {
        title: "技术栈",
        isVertical: false,
        list: [
          { value: "item1", text: "Vue", checked: false },
          { value: "item2", text: "React", checked: true },
          { value: "item3", text: "Node", checked: false },
          { value: "item4", text: "Java", checked: true },
          { value: "item5", text: "GO", checked: false },
        ],
      },
    },
    {
      fe_id: "c8",
      type: "questionSlider",
      title: "薪资满意度",
      isHidden: false,
      isLocked: false,
      props: {
        title: "满意度",
        noText: "不满意",
        yesText: "满意",
        curNum: 50,
      },
    },
    {
      fe_id: "c9",
      type: "questionTextarea",
      title: "薪资满意度",
      isHidden: false,
      isLocked: false,
      props: {
        title: "备注",
        placeholder: "请输入",
      },
    },
  ];
}

module.exports = getComponentList;
